﻿@{
    Response.Charset = "utf-8";
    string connID = Request.QueryString["connid"];
    if (!connID.IsGuid() || !Check.CheckLogin() || !Check.CheckUrl())
    {
        Response.Write("[]");
        Response.End();
    }
    List<string> tables = new Business.Platform.DBConnection().GetTables(connID.ToGuid());
    System.Text.StringBuilder sb = new System.Text.StringBuilder("[",1000);
    foreach(string table in tables)
    {
        sb.Append("{\"name\":");
        sb.AppendFormat("\"{0}\"", table);
        sb.Append("},");
    }
    Response.Write(sb.ToString().TrimEnd(',') + "]");
}